package cn.itsource.pojo.ro;

import cn.hutool.core.bean.BeanUtil;
import cn.itsource.pojo.domain.Order;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;

@Data
public class AddOrderRo {
    @NotEmpty(message = "carPlate不能为空")
    private String carPlate;
    @NotEmpty(message = "carType不能为空")
    private String carType;
    @NotEmpty(message = "endPlace不能为空")
    private String endPlace;
    private String endPlaceLatitude;
    private String endPlaceLongitude;
    private Integer expectMinutes;
    private BigDecimal expectsMileage;
  /* *//* @NotEmpty(message = "startPlace不能为空")*/
    private String startPlace;
    private String startPlaceLatitude;
    private String startPlaceLongitude;
    /*//顾客打赏 分加钱打车和结账的时候加钱*/
    private BigDecimal favourAmount;

    public static Order AddOrderRoToOrder(AddOrderRo orderRo){
        Order order = new Order();
        BeanUtil.copyProperties(orderRo,order);
        return order;
    }
}
